<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
   <!--在vue实例里使用组件时，:cInfo 要写成c-info-->
  <cpn :c-info="info" :my-child-message="message"></cpn>
</div>

<template id="tcpn">
  <div>
    <h2>{{cInfo}}</h2>
    <h2>{{myChildMessage}}</h2>
  </div>
  
</template>

<script src="../js/vue.js"></script>
<script>
  const cpn={
    template:'#tcpn',
    props:{
      cInfo:{
        type:Object,
        default(){
          return {}
        }
      },
      myChildMessage:{
        type:String,
        default:'a'
      }
    }
  }
  
  const app=new Vue({
    el: '#app',
    data: {
      info: {
        name: 'axu',
        age: 30,
        sex: '男'
      },
      message:'老温'
    },
    components:{
      cpn
    }
  })

</script>
</body>
</html>